A software application can be configured to write log messages to a log file during execution. Such log messages can record events that occur during execution of the software application and/or states of the software application at different times. However, determining whether to write particular log messages to the log file is difficult when balancing resource usage (e.g., storage space, processing power, and execution time) with effectiveness of the log file. Current logging techniques provide a one-size fits all solution that merely allows a user to define which levels (e.g., information, warning, error, etc.) of log messages to write to a log file. Accordingly, there is a need in the art to improve techniques for logging information in software applications.